<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="f" uri="/flowpage-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title><s:property value="operate"/>附件</title>
	<%@include file="/share/header.jsp"%>
	<s:head/>
	<f:header  theme="${sessionScope.skinCon.pageSkin}"/>	
  </head>
	<link rel="stylesheet" type="text/css"
		href="<%=path%>/dhtmlxVault/codebase/dhtmlxvault.min.css" />

	<script language="JavaScript" type="text/javascript"
		src="<%=path%>/dhtmlxVault/codebase/dhtmlxvault.src.js"></script>

	<script language="JavaScript" type="text/javascript">
        var vault = null;
        
		 <%-- 薛兰 2011-07-20 16:48:37 上传文档--%>
		 $(function(){
		 
		  <%--		   薛兰 2011-07-20 13:48:37 上传文件区域--%>
		 	vault = new dhtmlXVaultObject();
		 	vault.setImagePath("<%=path%>/dhtmlxVault/codebase/imgs/");
            vault.setServerHandlers("<%=path%>/dhtmlxVault/UploadHandler.jsp", "<%=path%>/dhtmlxVault/GetInfoHandler.jsp", "<%=path%>/dhtmlxVault/GetIdHandler.jsp");
            vault.create("vault1");
            vault.setModelValue("<%=request.getParameter("actionName")%>");//所属模块
            vault.setModelRecordId("<%=request.getParameter("parentId") %>");//所属模块中的某条记录的主键
           	vault.setFileExtensionList("<%=request.getParameter("fileExtensionStr")%>");//文件后缀类型
           	var filesize = "<%=request.getParameter("filesize")%>";//文件大小限制
           	if(null!=filesize)
           	{
           		vault.setMaxFileSize();//文件大小限制
           	}
           	vault.setBusinessType("999");//所属业务类型
<%--          	vault.setSaveFilePath("<%=request.getParameter("saveFilePath")%>");//文件保存路径--%>
          	vault.copyFileType('1');//文件所属类型
          	
          	vault.onUploadComplete=function(){
          		top.uploadListWindow.fisherReload();
          	}
	    });
		function uploadFileSave()
		{
			vault.uploadAllItems();
		}
	    function clearFile()
	    {
	    	vault.removeAllItems();
	    }
	  
	    //xl 2012-05-18 关掉上传附件的页面          
		function closeUploadFileWindow()
		{
			top.$.close('open_window_uploadfile');
		}
	    
	    function onChangeFileType()
	    {
	    	vault.copyFileType($('#fileType').val());
	    }
	    function onChangeBusinessType()
	    {
	    	vault.setBusinessType($('#businessTypeId').val());//所属业务类型
	    }
    </script>

	<style>
	body {font-size:12px;background-color:#eceef4;}
	.{font-family:arial;font-size:12px}
	h1 {cursor:hand;font-size:16px;margin-left:3px;line-height:10px}
    </style>

	<body id="aaaa">
		<s:actionerror/>
		<s:select name="domain.fileType" id="fileType" label="附件类型" multipleheight="1" multiplewidth="1" required="true" readonly="%{readonly}" disabled="%{disabled}" emptyOption="true"  list="getCodeItemList('fileType',fileExtensionStr)" listKey="value" listValue="name" value="1" onchange="onChangeFileType();"/>
		<s:if test="null!=businessType&&businessType!=''">
		<s:select name="domain.fileDes" id="businessTypeId" label="文件证明类型" multipleheight="1" multiplewidth="1" required="true" readonly="%{readonly}" disabled="%{disabled}" emptyOption="true"  list="getCodeItemList(businessType)" listKey="value" listValue="name" value="999" onchange="onChangeBusinessType();"/>
		</s:if>
		<br/><br/>
		<div id="vault1">
		</div>

	</body>
</html>
